﻿<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" CodeFile="ArticleAdd.aspx.cs" Inherits="nst_article_ArticleAdd" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
    <script src="/js/jquery.min1.4.2.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $("#txtContent").change(function() {
                $("#contentLength").text('长度：' + $(this).val().length);
            });
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table>
            <tr>
                <td style="width:40px">标题<span style="color:red">*</span></td>
                <td style="width:200px">
                    <asp:TextBox ID="txtTitle" runat="server" MaxLength="30"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="ReqTitle" runat="server" 
                        ControlToValidate="txtTitle" ErrorMessage="标题" Display="Dynamic"></asp:RequiredFieldValidator>
                </td>
                <td style="width:40px">分类</td>
                <td>
                    <asp:DropDownList ID="ddlType" runat="server">
                    </asp:DropDownList>
                    
                    score
                    <asp:DropDownList ID="ddlScore" runat="server">
                        <asp:ListItem>1</asp:ListItem>
                        <asp:ListItem>2</asp:ListItem>
                        <asp:ListItem>3</asp:ListItem>
                        <asp:ListItem>4</asp:ListItem>
                        <asp:ListItem Selected="True">5</asp:ListItem>
                        <asp:ListItem>6</asp:ListItem>
                        <asp:ListItem>7</asp:ListItem>
                        <asp:ListItem>8</asp:ListItem>
                        <asp:ListItem>9</asp:ListItem>
                        <asp:ListItem>10</asp:ListItem>
                    </asp:DropDownList>
                </td>                
            </tr>
            
            <tr>
                <td>作者</td>
                <td><asp:TextBox ID="txtAuthor" runat="server" MaxLength="50"></asp:TextBox></td>
                <td>来源</td>
                <td><asp:TextBox ID="txtSourceSite" runat="server" MaxLength="50"></asp:TextBox></td>
            </tr>
            
            <tr>
                <td>内容<span style="color:red">*</span></td>
                <td colspan="3">
                    <asp:TextBox ID="txtContent" runat="server" TextMode="MultiLine" Height="350px" Width="730px"></asp:TextBox>
                    <div id="contentLength">
                        
                    </div>
                    <asp:RequiredFieldValidator ID="ReqContent" runat="server" 
                            ControlToValidate="txtContent" ErrorMessage="输入内容"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td></td>
                <td colspan="3">
                    <asp:Button ID="ButtonAdd" runat="server" Text="添加" onclick="ButtonAdd_Click" />
                    <asp:Label ID="LabelMsg" runat="server" ForeColor="Red"></asp:Label>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
